<!--
 * @Author: 码上talk|RC
 * @Date: 2021-08-04 17:34:56
 * @LastEditTime: 2021-09-09 17:49:35
 * @LastEditors: 码上talk|RC
 * @Description: 
 * @FilePath: /ma-portal/subpackage/axq/pages/notice/@fragment/card.vue
 * @微信:  13680065830
 * @邮箱:  3189482282@qq.com
 * @oops: Just do what I think it is right
-->
<template>
  <view class="notice-card" @tap="toDetail(data.id)">
    <view class="notice-card-header">
      <text class="title">{{ black_Get(data,'title') }}</text>
      <text class="time">{{ black_Get(data,'createTime') }}</text>
    </view>
    <view class="img">
      <a-img-loader :src="data.url"></a-img-loader>
    </view>
  </view>
</template>

<script>
export default {
  name: 'NoticeCard',
  props: {
    data: Object,
  },
  data () {
    return {}
  },
  methods: {
    toDetail (id) {
      this.nav(`/subpackage/axq/pages/notice/_id?id=${id}`)
    }
  }
}
</script>

<style lang="less">
.notice-card {
  .flexLayout(@dir: column);
  padding: 0 25rpx;
  margin-top: 20rpx;
  background: #fff;
  border-radius: 20rpx;

  &-header {
    .flexLayout(@j: space-between);
    padding: 14rpx 0;

    .title {
      font-size: 32rpx;
      font-weight: 500;
      color: #333;
    }

    .time {
      font-size: 26rpx;
      color: #999;
    }
  }

  .img {
    padding: 20rpx 0;
    height: 200rpx;
    border-radius: 10rpx;
    overflow: hidden;
  }
}
</style>